package com.innodata.riskEngine.common.pojo;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Author: liboshuai
 * @Date: 2023-10-24 21:40
 **/
public class CdcSource implements Serializable {
    private static final long serialVersionUID = 6984843086225743923L;

    /**
     * 数据库名
     */
    private String database;
    /**
     * 表名
     */
    private String table;

    // setter and getter

    public String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        this.database = database;
    }

    public String getTable() {
        return table;
    }

    public void setTable(String table) {
        this.table = table;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CdcSource cdcSource = (CdcSource) o;
        return Objects.equals(database, cdcSource.database) && Objects.equals(table, cdcSource.table);
    }

    @Override
    public int hashCode() {
        return Objects.hash(database, table);
    }

    @Override
    public String toString() {
        return "CdcSource{" +
                "database='" + database + '\'' +
                ", table='" + table + '\'' +
                '}';
    }
}
